home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 2000 July / macformat-092.iso / MacFormat 92 CD / Shareware Plus / Utilities / FolderSynchronizer 1.8.9 / FoldersSynchronizer / FoldersSynchronizer.9 / AllScripts_1_Start.ls next >
Encoding:
Text File  |  2000-05-10  |  4.9 KB  |  211 lines

  1. on Start_______________________
  2. end
  3.  
  4. on startMovie
  5.   cursor(4)
  6.   set the exitLock to 1
  7.   InitSeparator()
  8.   InitVariabili()
  9.   InitXTRAs()
  10.   InitFolders()
  11.   InitFilters()
  12.   InitMulti()
  13.   InitTimer()
  14.   LookRegistration()
  15.   InitMonitor()
  16.   InitWindows()
  17.   InitAppleScript()
  18.   if not (the optionDown) then
  19.     LeggiPreferenze()
  20.   else
  21.     beep()
  22.   end if
  23.   if the commandDown then
  24.     EliminaStartAndQuit()
  25.   end if
  26.   InitMenu()
  27.   CheckSyncButton()
  28.   CheckOneDirection()
  29.   SetMenuCredits()
  30.   cursor(-1)
  31. end
  32.  
  33. on InitVariabili
  34.   global gSourceFolder, gDestFolder, gRememberFolders, gTopFolder, gBottomFolder, gBeepWhenDone, gSaveLogFile, gInvisible, gUnlockFile, gNero, gBianco, gGrigio, gViola, gArancio, gBlu, gThisVersion, gOneDirection, gDestructive, gOnErrorDo, gAskConfirm, gShortFlag, gShortReportList, gLogPathList, gShowPage, gTempDoAndQuit, gDoAndQuit, gJustLaunched
  35.   set gThisVersion to "1.8.9"
  36.   set gNero to the foreColor of member "Nero"
  37.   set gBianco to the foreColor of member "Bianco"
  38.   set gGrigio to the foreColor of field "Grigio"
  39.   set gViola to the foreColor of field "Viola"
  40.   set gArancio to the foreColor of field "Arancio"
  41.   set gBlu to the foreColor of field "Blu"
  42.   set gSourceFolder to EMPTY
  43.   set gDestFolder to EMPTY
  44.   set gTopFolder to EMPTY
  45.   set gBottomFolder to EMPTY
  46.   set gRememberFolders to 0
  47.   set gOneDirection to 0
  48.   set gDestructive to 0
  49.   set gBeepWhenDone to 0
  50.   set gSaveLogFile to 1
  51.   set gInvisible to 0
  52.   set gUnlockFile to 0
  53.   set gOnErrorDo to 0
  54.   set gAskConfirm to 1
  55.   set gShortFlag to 1
  56.   set gShortReportList to []
  57.   set gLogPathList to []
  58.   set gShowPage to 0
  59.   set gDoAndQuit to 0
  60.   set gTempDoAndQuit to 0
  61.   set gJustLaunched to 1
  62.   put " " into field "fSourceFolder"
  63.   put " " into field "fDestFolder"
  64.   put " " into field "fItems"
  65.   set the foreColor of member "P4" to gGrigio
  66.   updateStage()
  67. end
  68.  
  69. on EliminaStartAndQuit
  70.   global gDoAndQuit
  71.   set gDoAndQuit to 0
  72.   beep()
  73. end
  74.  
  75. on Esci
  76.   global gRegisteredCopy, gNero
  77.   SetMenuCredits()
  78.   ScriviFilePreference()
  79.   updateStage()
  80.   if gRegisteredCopy = 0 then
  81.     if (the frameLabel = "Lista") or (the frameLabel = "Info") then
  82.       puppetTransition("TranDx")
  83.     end if
  84.     set the foreColor of field "VersionField" to gNero
  85.     set the textStyle of field "VersionField" to "plain"
  86.     go("Uscita")
  87.     repeat while the mouseUp
  88.       nothing()
  89.     end repeat
  90.   end if
  91.   clearGlobals()
  92.   closeXLib()
  93.   quit()
  94. end
  95.  
  96. on stopMovie
  97.   global gSourceFolder, gDestFolder, gGrigio, gNero, gOneDirection
  98.   ScriviFilePreference()
  99.   set the foreColor of member "P4" to gGrigio
  100.   if gOneDirection then
  101.     put "BackUp" into field "P4"
  102.   else
  103.     put "Synchronize" into field "P4"
  104.   end if
  105.   set gSourceFolder to EMPTY
  106.   set gDestFolder to EMPTY
  107.   put " " into field "fSourceFolder"
  108.   put " " into field "fDestFolder"
  109.   put " " into field "fItems"
  110.   put " " into field "VersionField"
  111.   if the frameLabel = "Lista" then
  112.     set the locV of sprite 8 to 142
  113.     set the locV of sprite 2 to -1500
  114.     set the locV of sprite 3 to -1500
  115.     set the locV of sprite 4 to -1500
  116.   end if
  117.   clearGlobals()
  118.   set the windowList to []
  119.   updateStage()
  120. end
  121.  
  122. on VaiAlButton myButton, myLinea
  123.   case myButton of
  124.     "ScanFolder1":
  125.       AskForSourceFolder()
  126.     "ScanFolder2":
  127.       AskForDestFolder()
  128.     "Info":
  129.       GoPreferences()
  130.     "Filters0", "Filters1":
  131.       GoFilters()
  132.     "Freccia1":
  133.       ShowReportWindow()
  134.     "Freccia0":
  135.       CloseReportWindow()
  136.     "fOnOffList":
  137.       SetOneFilterOnOff(myLinea)
  138.     "fTypeList":
  139.       AskForType(myLinea)
  140.     "fCreatorList":
  141.       AskForCreator(myLinea)
  142.     "PickFile":
  143.       AskForTypeAndCreator(myLinea)
  144.     "fOperatorList":
  145.       AskForOperatorList(myLinea)
  146.     "fDateList":
  147.       AskForDate(myLinea)
  148.     "CancelFiltri":
  149.       GoLista()
  150.     "ApplyFiltri":
  151.       ApplyFiltri()
  152.     "Trash":
  153.       case the frameLabel of
  154.         "Filters":
  155.           AskDeleteAllFilters()
  156.         "Multi":
  157.           AskDeleteAllMulti()
  158.         "Timing":
  159.           AskDeleteAllTimer()
  160.       end case
  161.     "fOnOffMulti":
  162.       SetOneMultipleOnOff(myLinea)
  163.     "fSourceList":
  164.       AskForOneMultipleSource(myLinea)
  165.     "fDestList":
  166.       AskForOneMultipleDest(myLinea)
  167.     "SaveMulti":
  168.       SaveListaMulti()
  169.     "LoadMulti":
  170.       LoadListaMulti()
  171.     "ApplyMulti":
  172.       ApplyMulti()
  173.     "Timer0", "Timer1":
  174.       GoTimer()
  175.     "fOnOffTimer":
  176.       SetOneTimerOnOff(myLinea)
  177.     "fHourList":
  178.       AskForHour(myLinea)
  179.     "fDayList":
  180.       AskForDay(myLinea)
  181.     "ApplyTimer":
  182.       ApplyTimer()
  183.   end case
  184. end
  185.  
  186. on GoLista
  187.   if the frameLabel <> "Lista" then
  188.     set the keyDownScript to EMPTY
  189.     if the frameLabel = "Start" then
  190.       puppetTransition("TranDx")
  191.     else
  192.       puppetTransition("TranSx")
  193.     end if
  194.     go("Lista")
  195.     SetMenuLista()
  196.   end if
  197. end
  198.  
  199. on GoPreferences
  200.   go("Info")
  201.   SetMenuCredits()
  202. end
  203.  
  204. on GoCredits
  205.   if (the frameLabel = "Lista") or (the frameLabel = "Info") then
  206.     puppetTransition("TranDx")
  207.   end if
  208.   go("Credits")
  209.   SetMenuCredits()
  210. end
  211.